﻿@model IList<CategoryModel>
@using Nop.Core.Domain.Catalog;
@using Nop.Core.Infrastructure;
@using Nop.Services.Catalog;
@using Nop.Web.Models.Catalog;

<script type="text/javascript">
    function TabCuisineove(item) {
        $(item).find(".li_tanchu_da").show();

    }

    function TabCuisineout(item) {
        $(".li_tanchu_da").hide();

    }
</script>

@if (Model.Count > 0)
{
            <ul>
                @foreach (var category in Model)
                {
                    <li onmousemove="TabCuisineove(this)" onmouseout="TabCuisineout(this)">@category.Name<i class="sm_item_right">&nbsp;</i>
                    
                    <div class="li_tanchu_w">
                    <div class="li_tanchu_da" >
                    <div class="li_tanchu_caixi"><div class="li_tanchu_caixi_z">@category.Name</div><div class="li_tanchu_caixi_y"><a href="###">更多</a></div></div>
                    <div class="li_tanchu_xiantiao"></div>
                    <div class="li_tanchu_dalei">
                        @foreach (ProductOverviewModel p in category.RecmdProducts)
                        {
                            <span><a href="@Url.RouteUrl("ProductBuy", new { productId = p.Id })">@(p.Name!=null?(p.Name.Length>5?p.Name.Substring(0,5):p.Name):p.Name)</a></span>
                        }
                    </div>
       
                    <div class="li_tanchu_caixi"><div class="li_tanchu_caixi_z">品牌店</div><div class="li_tanchu_caixi_y"><a href="###">更多</a></div></div>
                    <div class="li_tanchu_xiantiao"></div>
                    <div class="li_tanchu_dalei">
                        @foreach (ManufacturerModel m in category.RecmdManufacturer)
                        {
                            <span><a href="@Url.Action("shop", "shop", new { id = m.Id })">@(m.Name != null ? (m.Name.Length > 5 ? m.Name.Substring(0, 5) : m.Name) : m.Name)</a></span>
                        }
                    </div>
                    </div>
                    </div>
                    
                    </li>
                }
            </ul>
}